package basic_practice_1003;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		Scanner scanner=new Scanner(System.in);
		
		List<Long>rabbits=new ArrayList<Long>();
		rabbits.add((long) 1);rabbits.add((long) 1);rabbits.add((long) 2);

		while(scanner.hasNext()) {
			int N=scanner.nextInt();
			if(N>=rabbits.size()) {
				for(int i=rabbits.size();i<N+5;i++) {
					rabbits.add(rabbits.get(i-1)+rabbits.get(i-2));
				}
			}
			System.out.println(rabbits.get(N));
		}
		
		scanner.close();
	}
	
}
